package com.health.commons;

import java.util.Locale;
import java.util.MissingResourceException;
import java.util.ResourceBundle;

public class PropertiesService {
 
	 private static final String BUNDLE_NAME = "resources";
	
	
	
	private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME);

	private PropertiesService() {
	}

	public static String getString(String key) {
		try {
			
			 
			return RESOURCE_BUNDLE.getString(key);
		} catch (MissingResourceException e) {
			
			
			//e.printStackTrace();
			return null;
		}
	}

	public static int getInteger(String key, int defaultInt) {
		try {
			return Integer.valueOf(RESOURCE_BUNDLE.getString(key));
		} catch (MissingResourceException e) {
			e.printStackTrace();
			return defaultInt;
		}
	}
}
